import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
// import Home from '../views/Home.vue'
const routes = [

	{//首页
		path: '/',
		name: 'Index',
		component: () => import("@/views/Index"),
		// 子组件
		children: [{
				path: '/personalCenter',
				name: 'personalCenter',
				component: () => import('@/views/PersonalCenter'),
			},
			{//主页
				path: '/home',
				name: 'home',
				component: () => import("@/views/Home"),
				
			},
			{//拼图列表
				path: '/jigsawPuzzleList',
				name: 'jigsawPuzzleList',
				component: () => import("@/views/JigsawPuzzleList"),
				
			},
			{//拼图详情
				path: '/jigsawPuzzleDetails',
				name: 'jigsawPuzzleDetails',
				component: () => import("@/views/JigsawPuzzleDetails"),
				
			},
			{//盲盒列表
				path: '/blindBoxList',
				name: 'blindBoxList',
				component: () => import("@/views/BlindBoxList"),
				
			},
			{//盲盒详情
				path: '/blindBoxDetails',
				name: 'blindBoxDetails',
				component: () => import("@/views/BlindBoxDetails"),
				
			},
			{
				path: '/integralRecord',
				name: 'integralRecord',
				component: () => import("@/views/IntegralRecord"),
				
			}
			,{
				path: '/signIn',
				name: 'signIn',
				component: () => import("@/views/SignIn"),
			}
		]
	}
	,{
		path: '/login',
		name: 'Login',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () => import( /* webpackChunkName: "about" */ '../views/Login.vue')
	}
	,{
		path: '/register',
		name: 'Register',
		component: () => import( /* webpackChunkName: "about" */ '../views/Register.vue')
	}
]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router
